﻿var zhou = angular.module('zhou', []);

 zhou.controller('MyController',
     function MyController($scope) {
         $scope.clock = {
             now: new Date()
         };
         var updateClock = function () {
             $scope.clock.now = new Date()
         };
         setInterval(function () {
             $scope.$apply(updateClock);
         }, 1000);
         // updateClock();
     })

 var app = angular.module('app', []);
 app.controller('FirstController', function ($scope) {
     $scope.counter = 0;
     $scope.add = function (amount) { $scope.counter += amount; };
     $scope.subtract = function (amount) { $scope.counter -= amount; };
 });

 var myApp = angular.module('myApp', []);